package ms.server.api.bean.vo;

import org.omg.CORBA.UNKNOWN;

/**
 * 状态码枚举
 * @Author ybc
 * @Date 2021/6/25 10:51
 */
public enum ResultCode {

    /*成功状态码*/
    SUCCESS(200, "SUCCESS"),
    /*错误状态码*/
    ERROR(500,"ERROR"),
    /*空指针异常*/
    UNKNOWN_EXCEPTION(501,"NULL POINTER"),
    /*服务器内部错误*/
    SERVER_ERROR(503,"SERVER ERROR");

    private Integer code;

    private String message;

    ResultCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer code() {
        return this.code;
    }

    public String message(){
        return this.message;
    }

}
